package com.tongfusoft.document.manager.dictionary.service;

import java.util.List;
import java.util.Map;

import com.tongfusoft.da.pagehelper.PageInfo;
import com.tongfusoft.document.entity.Dictionary;
import com.tongfusoft.document.entity.DictionaryClass;
import com.tongfusoft.document.entity.Users;
import com.tongfusoft.spring.web.core.data.DictionaryData;
import com.tongfusoft.spring.web.core.data.User;

public interface IDocumentDictionaryService {

	/**
	 * 字典表值表格
	 * @param pageIndex
	 * @param pageSize
	 * @param dict
	 * @return
	 */
	public PageInfo<Dictionary>  dictionaryPageTable(int pageIndex,int pageSize,Dictionary dict);
	/**
	 * 字典表分类表格
	 * @param pageIndex
	 * @param pageSize
	 * @param dictClass
	 * @return
	 */
	public PageInfo<DictionaryClass> dictCalssPageTable(int pageIndex,int pageSize,DictionaryClass dictClass);
	
	
	/**
	 * 从默认的字典表中获取所有的字典选项
	 * 根据DictionaryLoad注解获取所有的字典加载类，进行加载
	 * @return
	 */
	public Map<String, List<DictionaryData>> loadDict();
	
	/**
	 * 
	 * @param data
	 * @param user
	 */
	public  void createDictionary(Dictionary data,Users user );
	
	/**
	 * 
	 * @param data
	 * @param user
	 */
	public void updateDictionary(Dictionary data,Users user);
	
	/**
	 * 
	 * @param data
	 * @param user
	 */
	public void deleteDictionary(Dictionary data,Users user);
	
	/**
	 * 
	 * @param data
	 * @param user
	 */
	public  void createDictionaryClass(DictionaryClass data,Users user );
	
	/**
	 * 
	 * @param data
	 * @param user
	 */
	public void updateDictionaryClass(DictionaryClass data,Users user);
	
	/**
	 * 
	 * @param data
	 * @param user
	 */
	public void deleteDictionaryClass(DictionaryClass data,Users user);
	
	/**
	 * 获取字典分类详情
	 * @param dictClassId
	 * @return
	 */
	public DictionaryClass getDictClass(DictionaryClass dictClass);
	
	/**
	 * 获取字典值详情
	 * @param dictId
	 * @return
	 */
	public Dictionary getDict(Dictionary dict);
	
	
	/**
	 * 获取字典分类列表
	 * @param dictionaryClass
	 * @return
	 */
	public List<Dictionary> getDictionaryListByDictClassId(DictionaryClass dc);
	
	
	/**
	 * 根据字典分类编码获取
	 * @param DictclassCode
	 * @return
	 */
	public List<Dictionary> getDictByCode(String dictclassCode);

	
	
}
